import type { AxiosResponse } from 'axios'
import dayjs from 'dayjs'
import request from '@/utils/request'
import { config } from '@/config'

/**
 * ”我的“页面接口
 */
class MsgSendServe {
  /**
   * 检查更新
   */
  getVersionInfo<T = any>(): Promise<AxiosResponse<T>> {
    return request({
      url: config.checkVersonUrl,
      method: 'get',
      params: {
        // 避免json文件缓存
        timestamp: dayjs().valueOf()
      }
    })
  }

  isForce<T = any>(): Promise<AxiosResponse<T>> {
    return request({
      url: 'cgjybzIndustry/isForce',
      method: 'get'
    })
  }
}

export default new MsgSendServe()
